home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / X11 / Fresco / build / Unix / config / cf / necLib.rules < prev    next >
Text File  |  1995-07-12  |  4KB  |  130 lines

  1. XCOMM $XConsortium: necLib.rules,v 1.2 94/04/11 21:17:09 rws Exp $
  2.  
  3. /*
  4.  * NECOS shared library rules
  5.  */
  6.  
  7. #ifndef HasSharedLibraries
  8. #define HasSharedLibraries YES
  9. #endif
  10. #ifndef SharedDataSeparation
  11. #define SharedDataSeparation YES
  12. #endif
  13. #ifndef SharedCodeDef
  14. #define SharedCodeDef
  15. #endif
  16. #ifndef SharedLibraryDef
  17. #define SharedLibraryDef
  18. #endif
  19. #ifndef ShLibIncludeFile
  20. #define ShLibIncludeFile <necLib.tmpl>
  21. #endif
  22. #ifndef SharedLibraryLoadFlags
  23. #define SharedLibraryLoadFlags
  24. #endif
  25. #ifndef PositionIndependentCFlags
  26. #define PositionIndependentCFlags
  27. #endif
  28.  
  29.  
  30. #ifndef SeparateSharedCompile
  31. #define SeparateSharedCompile NO
  32. #endif
  33.  
  34. #define SharedLibObjCompile(options) $(_NULLCMD_)
  35.  
  36. /*
  37.  * InstallSharedLibrary - generate rules to install the shared library.
  38.  */
  39. #ifndef InstallSharedLibrary
  40. #define    InstallSharedLibrary(libname,rev,dest)                @@\
  41. install:: Concat(lib,libname.so.rev)                     @@\
  42.     MakeDir($(DESTDIR)dest)                        @@\
  43.     $(INSTALL) -c $(INSTLIBFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\
  44.     $(LN) $(DESTDIR)dest/Concat(lib,libname.so.rev) $(DESTDIR)dest/Concat(lib,libname.so)    @@\
  45.  
  46. #endif /* InstallSharedLibrary */
  47.  
  48. /*
  49.  * InstallSharedLibraryData - generate rules to install the shared library data
  50.  */
  51. #ifndef InstallSharedLibraryData
  52. #define    InstallSharedLibraryData(libname,rev,dest)            @@\
  53. install:: Concat(lib,libname.sa.rev)                    @@\
  54.     MakeDir($(DESTDIR)dest)                        @@\
  55.     $(INSTALL) -c $(INSTLIBFLAGS) Concat(lib,libname.sa.rev) $(DESTDIR)dest @@\
  56.     RanLibrary($(RANLIBINSTFLAGS) Concat($(DESTDIR)dest/lib,libname.sa.rev))
  57.  
  58. #endif /* InstallSharedLibraryData */
  59.  
  60. /*
  61.  * SharedCplusplusLibraryTarget - generate rules to create a shared C++
  62.  * library; use $(CXXLINK) instead of $(LD) in case the library needs
  63.  * global constructors to be called.
  64.  *
  65.  * Not tested yet; send any bug fixes to fresco@x.org.
  66.  */
  67. #ifndef SharedCplusplusLibraryTarget
  68. #define SharedCplusplusLibraryTarget(libname,rev,solist,down,up,need_libs) @@\
  69. AllTarget(Concat(lib,libname.so.rev))                    @@\
  70.                                     @@\
  71. Concat(lib,libname.so.rev):  solist                    @@\
  72.     $(RM) $@                            @@\
  73.     $(CXXLINK) -G -o $@ $(SHLIBLDFLAGS) solist need_libs        @@\
  74.                                     @@\
  75. AllTarget(Concat(lib,libname.so))                    @@\
  76.                                     @@\
  77. Concat(lib,libname.so):  Concat(lib,libname.so.rev)            @@\
  78.     $(RM) $@                             @@\
  79.     $(LN) $? $@                            @@\
  80.                                     @@\
  81. clean::                                    @@\
  82.     $(RM) Concat(lib,libname.so.rev)
  83.  
  84. #endif /* SharedCplusplusLibraryTarget */
  85.  
  86. /*
  87.  * NormalSharedLibraryTarget - generate rules to create a shared library;
  88.  * build it into a different name so that the we do not hose people by having
  89.  * the library gone for long periods.
  90.  */
  91. #ifndef SharedLibraryTarget
  92. #define SharedLibraryTarget(libname,rev,solist,down,up)            @@\
  93. AllTarget(Concat(lib,libname.so.rev))                    @@\
  94.                                     @@\
  95. Concat(lib,libname.so.rev):  solist                    @@\
  96.     $(RM) $@~                            @@\
  97.     $(CC) -G -o $@~ $(SHLIBLDFLAGS) solist                @@\
  98.     $(RM) $@                             @@\
  99.     $(MV) $@~ $@                            @@\
  100.                                     @@\
  101. AllTarget(Concat(lib,libname.so))                    @@\
  102.                                     @@\
  103. Concat(lib,libname.so):  Concat(lib,libname.so.rev)            @@\
  104.     $(RM) $@                             @@\
  105.     $(LN) $? $@                            @@\
  106.     LinkBuildLibrary($@)                        @@\
  107.     LinkBuildLibrary(Concat(lib,libname.so))            @@\
  108.                                     @@\
  109. clean::                                    @@\
  110.     $(RM) Concat(lib,libname.so.rev)
  111.  
  112. #endif /* SharedLibraryTarget */
  113.  
  114. /*
  115.  * SharedLibraryDataTarget - generate rules to create shlib data file;
  116.  */
  117. #ifndef SharedLibraryDataTarget
  118. #define SharedLibraryDataTarget(libname,rev,salist)            @@\
  119. AllTarget(Concat(lib,libname.sa.rev))                    @@\
  120.                                     @@\
  121. Concat(lib,libname.sa.rev):  salist                    @@\
  122.     $(RM) $@                            @@\
  123.     $(AR) $@ salist                            @@\
  124.     RanLibrary($@)                            @@\
  125.                                     @@\
  126. clean::                                    @@\
  127.     $(RM) Concat(lib,libname.sa.rev)
  128.  
  129. #endif /* SharedLibraryDataTarget */
  130.